﻿namespace WriterStars.Data
{
    using System.Data.Entity;
    using Microsoft.AspNet.Identity.EntityFramework;
    
    using WriterStars.Data.Repository;
    using WriterStars.Model;

    public class WriterStarsDbContext : IdentityDbContext<User>, IWriterStarsDbContext
    {
        public WriterStarsDbContext()
            : base("WriterStars", throwIfV1Schema: false)
        {
        }

        public virtual IDbSet<Book> Books { get; set; }

        public virtual IDbSet<Tag> Tags { get; set; }

        public virtual IDbSet<Like> Likes { get; set; }

        public virtual IDbSet<Author> Authors { get; set; }

        public virtual IDbSet<Category> Categories { get; set; }

        public virtual IDbSet<Contest> Contests { get; set; }

        public virtual IDbSet<ContestBook> ContestBooks { get; set; }

        public virtual IDbSet<Subscriber> Subscribers { get; set; }

        public virtual IDbSet<Order> Orders { get; set; }

        public virtual IDbSet<UserCategory> UserCategories { get; set; }

        public virtual IDbSet<Notification> Notifications { get; set; }


        public static WriterStarsDbContext Create()
        {
            return new WriterStarsDbContext();
        }
    }
}